import { App } from 'vue'
import 'element-plus/theme-chalk/index.css'
import {
  ElInput,
  ElButton,
  ElForm,
  ElFormItem,
  ElCheckbox,
  ElRadio,
  ElLink,
  ElTabs,
  ElTabPane,
  ElContainer,
  ElMain,
  ElHeader,
  ElSlider,
  ElMenu,
  ElSubMenu,
  ElMenuItem,
  ElDropdown,
  ElDropdownItem,
  ElDropdownMenu,
  ElAvatar,
  ElRow,
  ElCol,
  ElSelect,
  ElDatePicker,
  ElSwitch,
  ElRadioGroup,
  ElCheckboxGroup,
  ElOption,
  ElTimePicker,
  ElBreadcrumb,
  ElBreadcrumbItem,
  ElTable,
  ElTableColumn,
  ElPagination,
  ElImage
} from 'element-plus'

const components = [
  ElInput,
  ElButton,
  ElForm,
  ElFormItem,
  ElCheckbox,
  ElRadio,
  ElLink,
  ElTabs,
  ElTabPane,
  ElContainer,
  ElMain,
  ElHeader,
  ElSlider,
  ElMenu,
  ElSubMenu,
  ElMenuItem,
  ElDropdown,
  ElDropdownItem,
  ElDropdownMenu,
  ElAvatar,
  ElRow,
  ElCol,
  ElSelect,
  ElOption,
  ElDatePicker,
  ElTimePicker,
  ElSwitch,
  ElRadioGroup,
  ElCheckboxGroup,
  ElBreadcrumb,
  ElBreadcrumbItem,
  ElTable,
  ElTableColumn,
  ElPagination,
  ElImage
]

export default function (app: App): void {
  components.forEach((component) => {
    app.component(component.name, component)
  })
}
